"""
@author: shaoshuai
@file :teacher.py
@time: 2021/12/29 21:07
"""
# 记录当前用户登录状态
teacher_info = {
    'user' : None
}

def login():
    pass

def select_course():
    pass

def choice_course():
    pass

def select_student():
    pass

def change_score():
    pass

func_dic = {
    '1': login,
    '2': select_course,
    '3': choice_course,
    '4': select_student,
    '5': change_score,
}


# 启动函数
def teacher_view():
    while True:
        print('''
           ========欢迎来到讲师视图层==========
                     - 1.登录
                     - 2.查看教授课程
                     - 3.选择教授课程
                     - 4.查看课程下学生
                     - 5.修改学生分数
           ============24小时为您服务==========
           ''')

        choice = input('请选择功能编号（输入q退出）: ').strip()

        if choice == 'q':
            break

        if not choice.isdigit():
            print('请输入数字！')
            continue

        if choice not in func_dic:
            print('请输入正确的编号！')
            continue

        func_dic.get(choice)()